<template>
	<view :class="[BackGround]" :style="[{'font-weight':Style,'font-family':Font,height:100 + '%',minHeight:height + 'px'}]">
		<cu-custom bgColor="bg-gradual-blue" isBack="true">
			<view slot="backText">返回</view>
			<view slot="content">选择员工</view>
		</cu-custom>
		<sear-ch :placeholder="placeholder" @clean="clean" @input="input" @remove="remove"></sear-ch>
		<list-form :list="deliverplan" @backTo="backTo" :marginTop="110"></list-form>
		<back-top v-if="isShow" @topClick="topClick">
			<image class="topimg" mode="aspectFit" src="https://www.ahlinghui.com/Uploads/image/20190429/images/BackTop.png"></image>
		</back-top>
	</view>
</template>

<script>
	import SearCh from '@/colorui/components/search.nvue'
	import ListForm from '@/colorui/components/ListForm/ListForm.vue'
	import BackTop from '@/colorui/components/BackTop.vue'
	import {
		mapGetters,
		mapMutations
	} from 'vuex'
	import {
		getSelect
	} from "@/service/selectList"
	import {
		inputSearch
	} from '@/mixin/mixin.js'
	export default {
		mixins: [inputSearch],
		data() {
			return {
				placeholder: '姓名',
				height:this.screenHeight,
				deliverplan: [],
				isShow: false,
				searchView:'LUSERNAME',
				item: ''
			}
		},
		computed: {
			...mapGetters([
				'Style',
				'Font',
				'BackGround','BackGroundBox'
			])
		},
		components: {
			SearCh,
			ListForm,
			BackTop
		},
		onLoad() {
			getSelect(1005, '', '', {}).then(res => {
				this.deliverplan = res.data;
			})
		},

		methods: {
			...mapMutations(['setitem']),
			topClick() {
				uni.pageScrollTo({
					scrollTop: 0,
					duration: 300
				});
			},
			backTo(item) {
				this.item = item
				this.setitem(item)
				uni.navigateBack({
					delta: 1
				});
			}
		},
		onPageScroll(e) {
			e.scrollTop > 600 ? this.isShow = true : this.isShow = false
		}

	}
</script>

<style>
	page {
		background-color: whitesmoke;
	}

	.topimg {
		width: 100rpx;
		height: 100rpx;
	}
</style>
